package com.soft.collateral.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Set;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("menu")
@ApiModel(value="Menu对象", description="菜单表")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜单id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "metaID")
    @TableField("meta_id")
    private Integer metaId;

    @ApiModelProperty(value = "菜单名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "路径")
    @TableField("path")
    private String path;

    @ApiModelProperty(value = "组件")
    @TableField("component")
    private String component;

    @ApiModelProperty(value = "目录顺序")
    @TableField("priority")
    private Integer priority;

    @ApiModelProperty(value = "父菜单id")
    @TableField("parentMenuId")
    private Integer parentMenuId;

    @ApiModelProperty(value = "等级")
    @TableField("level")
    private Integer level;

    @TableField("menu_type")
    @ApiModelProperty(value = "0导航菜单 1功能菜单")
    private String menuType;

    //一对一关联 Meta
    @TableField(exist = false)
    private Meta meta;

    @ApiModelProperty(value = "菜单权限")
    @TableField(exist = false)
    private Set<Roles> role;
}
